package com.gzy.action;


import com.gzy.entity.Ware;
import com.gzy.service.IWareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 郭梓炀
 * @since 2022-05-03
 */

@RequestMapping("/ware")
@RestController
public class WareController {
    @Autowired
    IWareService wareService;

    @RequestMapping("list")
    public ResponseEntity list(){
        List<Ware> list = wareService.list();
        return new ResponseEntity(list, HttpStatus.OK);
    }

}
